package com.hejing.面向对象特征之三_多态.向下转型;

/**
 * ClassName: Man
 * Package: com.hejing.面向对象特征之三_多态.初识多态
 * Description:
 *
 * @Author: HeJing
 * @Create: 2023-03-26 11:21
 * @Version: 1.0
 */
public class Man extends Person {
    boolean isSmoking;


    // 方法重写测试
    public void eat() {
        System.out.println("男人多吃肉");
    }

    public void walk() {
        System.out.println("男人笔挺的走路");
    }

    // 特有的方法
    public void earnMoney() {
        System.out.println("男人挣钱养家");
    }
}





















